package com.weapons.week0903_weapons.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.weapons.week0903_weapons.fragment.RecommendFragment;

import java.util.List;


public class VpAdapter extends FragmentPagerAdapter {
    private int COUNT=5;
    private String[] mTitles = {"推荐", "环球", "图片", "论坛", "武器"};
    public VpAdapter(FragmentManager fm) {
        super(fm);
    }
    private List<Fragment> mFragment;
    private Context mContext;

    public VpAdapter(FragmentManager fm, Context mContext, List<Fragment> mFragment) {
        super(fm);
        this.mContext = mContext;
        this.mFragment = mFragment;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragment.get(position);
    }

    @Override
    public int getCount() {
        return mFragment.size();
    }
}
